<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="mall/advert/include::header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>视频编辑</h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
							<input type="hidden" id="id" name="id" th:value="${video.id}">
							<div class="form-group">
								<label class="col-sm-3 control-label">视频标题:</label>
								<div class="col-sm-8">
									<input id="title" name="title" class="form-control" type="text" maxlength="50" th:value="${video.title}">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">视频类型:</label>
								<div class="col-sm-8">
									<select data-placeholder="" class="form-control chosen-select"  tabindex="30" id="video_id" name="video_id"  th:field="*{video.video_id}">
										<option th:each="item: ${videoType}" th:text="${item.video_name}"  th:value="${item.video_id}" ></option>
									</select>
								</div>
							</div>

							<div class="form-group">
								<label class="col-sm-3 control-label">排序(小数靠前,不填默认0):</label>
								<div class="col-sm-6">
									<input id="sort" name="sort"
										   onkeyup="this.value=this.value.replace(/[^0-9-]+.[^0-9-]+/,'');"
										   th:value="${video.sort}"
										   class="form-control" type="text" maxlength="10">
								</div>
								<label class="col-sm-2 control-label" style="text-align: left"></label>
							</div>

							<div class="form-group" id="videoDiv" >
								<label class="col-sm-3 control-label">视频:</label>
								<div class="col-sm-6">
									<input id="url" name="url" class="form-control" type="text"
										   onblur="onThumbBlur()" readonly placeholder="上传视频"
										   th:value="${video.url}">
								</div>
								<div class="col-sm-2">
									<button class="btn btn-primary" type="button"
											onclick="onSelectImgBtnClick('url','url');">
										<i class="fa fa-check"></i>选择媒体文件</button>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">视频说明:</label>
								<div class="col-sm-8">
									<input id="explain" name="explain" class="form-control" type="text" maxlength="500" th:value="${video.explain}">
								</div>
							</div>
							<div class="form-group text-center">
								<div class="col-sm-8 col-sm-offset-2">
									<button type="submit" class="btn btn-primary"><i class="fa fa-check"></i>提交</button>
									<div class="btn btn-danger" onclick="closeDow()"><i class="fa fa-remove"></i> 关闭</div>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div th:include="mall/advert/include::footer"></div>
	<script type="text/javascript" src="/js/appjs/sys/video/editVideoPage.js">
	</script>
	<script type="text/javascript">
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
	</script>
</body>

</html>
